package ie.deloitte.cvapp.domain;

import java.io.Serializable;
//import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "skillmatrix", catalog = "javabootcamp", schema = "")
@NamedQueries({
	@NamedQuery(name = "Skills.findAll", query = "SELECT sk FROM Skills sk"),
	@NamedQuery(name = "Skills.findByIdSkills", query = "SELECT sk FROM Skills sk WHERE sk.idSkill = :idSkill")})


public class Skills  implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idSkill", nullable = false)
    private Integer idSkill;
	
	@Size(max = 120)
    @Column(name = "name", length = 120)
    private String name;
    
	public Skills(){
		
	}
	
	public Skills(Integer idSkill){
		this.setIdSkill(idSkill);
	}

	public Integer getIdSkill() {
		return idSkill;
	}

	public void setIdSkill(Integer idSkill) {
		this.idSkill = idSkill;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Override
    public int hashCode() {
        int hash = 0;
        hash += (idSkill != null ? idSkill.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Employee)) {
            return false;
        }
        Skills other = (Skills) object;
        if ((this.idSkill == null && other.idSkill != null) || 
        		(this.idSkill != null && !this.idSkill.equals(other.idSkill))) {
            return false;
        }
        return true;
    }	
}
